1. Field of Invention
The present invention relates to a method and an apparatus for performing volume replication. More particularly, the present invention relates to a method and an apparatus for performing volume copying and volume mirroring using a unified architecture.
2. Description of Related Art
In the modern societies, storage devices have been widely used in various computer systems or storage systems. According to storage purposes, some storage devices are used for storing the data needing to be constantly accessed while a storage system is operated. Such storage devices are referred to as primary storage devices. Another kind of storage devices is used for storing the backup data existing in the primary storage device, and is referred to as a secondary storage device which can replace the primary storage device to maintain normal system operations when the primary storage device fails or breaks down, thereby enhancing system reliability.
The storage devices can be hard disk drives, tapes, memory drives, optical storage drives or other storage devices for storing data. Such storage devices all are physical storage devices (PSDs).
A storage system (or computer system) does not actually consider one physical storage device (PSD) as a unit when managing data, but combines different sections from one or more PSDs as a logical drive (LD) or as a partition. When a controller maps the LD or the partition to a host for data access, the LD or the partition mapped is referred to as a logical unit. A LD or partition can be further divided into one or more data storage areas referred to as media extents. Many of data storage systems may replicate a portion or all of a volume to another volume integrally. Thus, whenever the original data are damaged or failed to be read, the replicated data can be used to recover the original data or substituted as the original data for other applications.
The source where the replicated data is copied from is referred to as a source volume, and the destination storing the replicated data is referred to as a destination volume. The date replication with the unit of a volume can be used for the following purposes: backing up, reporting or archiving the source volume; or substituting the source volume for performing any operations requiring the source volume, such as simulating, predicting and data mining, etc. Especially, data accessing operations usually perform a locking mechanism on the to-be-accessed data before actually access it, and thus it is inevitable to affect data reading efficiency and also to affect the normal data access of the host. Hence, if the destination volume is used to substitute the source volume for performing the aforementioned operations, the source volume can provide the host data accessing service without affecting the efficiency.
Volume copying and volume mirroring are two volume replication methods popularly used in industries, in which the volume copying is used for copying data of the source volume at a starting time point of the replication operation (i.e. the time point of issuing a split command) and it is generally a one-time copy, and the volume mirroring is used to consistently maintain a data synchronization relationship between two volumes, i.e. considering the destination volume as a mirror of the source volume. In conventional skills, the volume copying and the volume mirroring are implemented by two different architectures. Also, in the conventional skills, each of two volumes (i.e. source volume and destination volume) of a mirror pair requires maintaining a tracking table used for recording the mirroring state of each corresponding data block on the volume (source volume or destination volume), and recording the information whether the corresponding data block has been modified during the volume mirroring. A mirroring pair needs two tracking tables respectively stored in the source volume and the destination volume. If a volume A establishes a mirroring pair relationship respectively with each of volumes B, C and D, then the volume A needs to administer three tracking tables. Due to the features of the aforementioned conventional skills, the operations of the volume copying and the volume mirroring are quite complicated and inefficient.
Hence, if there is a unified architecture which can cover both operations of volume copying and volume mirroring and can simply the administration of tracking tables, or in other words, if there is a unified architecture under which the volume copying and the volume mirroring are merely operational options of a single unified volume synchronization function, then the operation efficiency of a storage system can be effectively promoted.